package com;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.Gson;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Objects;

/**
 * @Package: com
 * @ClassName: test
 * @Author: wulongkai
 * @CreateTime: 2024/1/4 17:22
 * @Description:
 */
public class test {

    public static void main(String[] args) {
        String json = "{\n" +
                "  \"basicSalaryIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"基本工资涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517437965222031360\",\n" +
                "    \"calculatedFieldName\": \"【LF】录用-合同签署薪资\",\n" +
                "    \"afterCalculatedField\": \"1646735552159944704\",\n" +
                "    \"afterCalculatedFieldName\": \"[new]其他附件-含薪资\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"performanceIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"绩效涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057281227763712\",\n" +
                "    \"afterCalculatedFieldName\": \"费用中心-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"yearEndBonusIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"年终奖涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057122376888320\",\n" +
                "    \"afterCalculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"68\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"TTCIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"年度目标总现金（TTC）涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057122376888320\",\n" +
                "    \"afterCalculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\",\n" +
                "      \"68\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"shareIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"股票期限涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057281227763712\",\n" +
                "    \"calculatedFieldName\": \"费用中心-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057122376888320\",\n" +
                "    \"afterCalculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"totalIncomeIncrease\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"年度目标总收入涨幅\",\n" +
                "    \"type\": 1,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057281227763712\",\n" +
                "    \"afterCalculatedFieldName\": \"费用中心-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\"\n" +
                "    ],\n" +
                "    \"editGroup\": null\n" +
                "  },\n" +
                "  \"otherSalaryMeasurePrice\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"补助/其他薪资（元/年）\",\n" +
                "    \"type\": 2,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1607267720947044352\",\n" +
                "    \"afterCalculatedFieldName\": \"预入职-薪酬方案【薪资结构】\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"67\",\n" +
                "      \"80\"\n" +
                "    ],\n" +
                "    \"editGroup\": [\n" +
                "      \"68\"\n" +
                "    ]\n" +
                "  },\n" +
                "  \"groupShareMeasurePrice\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"集团股票期权测算价格（元/股）\",\n" +
                "    \"type\": 2,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1517057122376888320\",\n" +
                "    \"calculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"afterCalculatedField\": \"1517057281227763712\",\n" +
                "    \"afterCalculatedFieldName\": \"费用中心-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"68\"\n" +
                "    ],\n" +
                "    \"editGroup\": [\n" +
                "      \"80\"\n" +
                "    ]\n" +
                "  },\n" +
                "  \"houseShareMeasurePrice\": {\n" +
                "    \"field\": null,\n" +
                "    \"fieldName\": \"房产股票期权测算价格（元/股）\",\n" +
                "    \"type\": 2,\n" +
                "    \"frontShowName\": null,\n" +
                "    \"shouldMeasurement\": null,\n" +
                "    \"calculatedField\": \"1646421248713961472\",\n" +
                "    \"calculatedFieldName\": \"全局-文本-123.456+789-345.11(包含计算符号)\",\n" +
                "    \"afterCalculatedField\": \"1517057122376888320\",\n" +
                "    \"afterCalculatedFieldName\": \"考核周期-计算字段\",\n" +
                "    \"onlyReadGroup\": [\n" +
                "      \"68\"\n" +
                "    ],\n" +
                "    \"editGroup\": [\n" +
                "      \"67\"\n" +
                "    ]\n" +
                "  },\n" +
                "  \"securityGroupRoleIds\": \"68,80,67\"\n" +
                "}";
        SalaryMeasurementConfig config = new Gson().fromJson(json, SalaryMeasurementConfig.class);
        List<SalaryFieldConfig> fieldConfigList = config.queryListSortForConfig();
        List<SalaryFieldConfig> defaultConfig = SalaryMeasurementConfig.getDefaultConfig().queryListSortForMeasurementPage();
        for (int i = 0; i < fieldConfigList.size(); i++) {
            System.out.println(fieldConfigList.get(i).getField() + "  " + defaultConfig.get(i).getField() + "  " + (Objects.equals(fieldConfigList.get(i).getField(), defaultConfig.get(i).getField())));
        }
    }
}
@Data
@Getter
@Setter
class obj {
    @JsonProperty("TTCIncrease")
    String TTCIncrease;
}

enum WorkDayEnum implements Cloneable{
    MONDAY(1, "星期一"),
    TUESDAY(2, "星期二"),
    WEDNESDAY(3, "星期三"),
    THURSDAY(4, "星期四"),
    FRIDAY(5, "星期五"),
    SATURDAY(6, "星期六"),
    SUNDAY(7, "星期日");
    int code;
    String desc;

    WorkDayEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}

@Data
class study {
    private int age;
}